﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BoxScore.Objetos;
using BoxScore.Model;

namespace BoxScore.Estadisticas
{
    public partial class XJuego : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            BoxScoreBD bd = new BoxScoreBD();
            EstadisticasJugadores ej = new EstadisticasJugadores();
            
            if (TabPanel1.Visible)
            {
                //extraigo datos  ofensivos
                ej.estofe = _estOfensivas1.getOffensivesEstadistics();
            }

            if (TabPanel2.Visible)
            {
                ej.estdef = _estDefensiva1.getEstadisticasXPosicion();
                // extraigo datos defensivos   
            }

            if (TabPanel3.Visible)
            {
                ej.estpit = _estPitcheo1.getPitchingStadistics();
                // extraigo datos pitcheo
            }
        }

        protected void checkBateo_CheckedChanged(object sender, EventArgs e)
        {
            this.TabPanel1.Visible = false;
            if (checkBateo.Checked == true)
            {
                this.TabPanel1.Visible = true;
            }
        }

        protected void checkDefensa_CheckedChanged(object sender, EventArgs e)
        {
            TabPanel2.Visible = false;
            if ( checkDefensa.Checked == true)
            {
                this.TabPanel2.Visible = true;
            }
        }

        protected void checkPitcheo_CheckedChanged(object sender, EventArgs e)
        {
            TabPanel3.Visible = false;
            if (checkPitcheo.Checked == true)
            {
                this.TabPanel3.Visible = true;
            }

        }
    }
}
